// https://github.com/wilsonpage/sass-import-once
// @mixin exports($name)


// Strip Unit
// Removes the unit (e.g. px, em, rem) from a value, returning the number only.
//
// @param {number} $num - Number to strip unit from.
//
// @return The same number, sans unit.
@function strip-unit($num) {
  @return $num / ($num * 0 + 1);
}
// Convert to Rem
// Converts a pixel value to matching rem value. *Any* value passed, regardless of unit, is assumed to be a pixel value. By default, the base pixel value used to calculate the rem value is taken from the `$rem-base` variable.
//
// @param {number} $value - Pixel value to convert.
//
// @return A number in rems, calculated based on the given value and the base pixel value.
@function to-rem($value, $base-value: $rem-base)  {
  $value: strip-unit($value) / strip-unit($base-value) * 1rem;
  @if ($value == 0rem) { $value: 0; } // Turn 0rem into 0
  @return $value;
}

// Rem Calculator
// Converts one or more pixel values into matching rem values. This function works a lot like `convert-to-rem`, except it can convert more than one value at once, which is useful when setting multiple values on a `margin` or `padding` property.
//
// @param {number|list} $values - One or more values to convert. Be sure to separate them with spaces and not commas. If you need to convert a comma-separated list, wrap the list in parentheses.
//
// @return A list of converted values.
@function rem-calc($values, $base-value: null) {
  @if $base-value == null {
    $base-value: $rem-base;
  }
  $max: length($values);

  @if $max == 1 {
    @return to-rem(nth($values, 1), $base-value);
  }

  $remValues: ();
  @for $i from 1 through $max {
    $remValues: append($remValues, to-rem(nth($values, $i), $base-value));
  }

  @return $remValues;
}